Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: basic rating display #2653

Open
wants to merge 4 commits into
base: feat/reviews-and-ratings
Choose a base branch
from

Conversation

Guilera
Copy link
Collaborator

@Guilera Guilera commented Jan 29, 2025

⚠️ THIS PR DEPENDS ON PR#2648 ⚠️

What's the purpose of this pull request?

To add rating stars to existing components:

  • <ProductCardContent/>
  • <ProductTitle/>

How it works?

If the feature flag for reviews and ratings, defined at discovery.config, it's turned on, then everywhere a <ProductCard/> is used then it will display the product star rating

How to test it?

preview

References

JIRA TASK: SFS-2063
JIRA TASK: SFS-2065

image
image
image
image

Checklist

You may erase this after checking them all 😉

PR Description

  • Displays rating at Just Arrived
  • Displays rating at Most Wanted
  • Displays rating at Deals & Promotions
  • Displays rating at Product Details
  • Displays rating at Product Gallery

@Guilera Guilera requested a review from a team as a code owner January 29, 2025 21:35
Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview Jan 30, 2025 3:04pm

Copy link

codesandbox-ci bot commented Jan 29, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@lucasfp13 lucasfp13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Guilera Guilera mentioned this pull request Feb 6, 2025
2 tasks
@Guilera Guilera force-pushed the feat/basic-rating-display branch 3 times, most recently from 160d8be to e59b001 Compare February 12, 2025 20:39
@Guilera Guilera changed the base branch from feat/reviews-and-ratings to feat/rating-resolvers February 12, 2025 20:40
Base automatically changed from feat/rating-resolvers to feat/reviews-and-ratings February 14, 2025 13:26
@Guilera Guilera force-pushed the feat/basic-rating-display branch from e59b001 to 6cc5ce0 Compare February 14, 2025 13:43
@@ -68,15 +77,31 @@ type Props = PDPContentType & {
// https://www.npmjs.com/package/deepmerge
const overwriteMerge = (_: any[], sourceArray: any[]) => sourceArray

const isClientOfferEnabled = (storeConfig as StoreConfig).experimental
.enableClientOffer

function Page({ data: server, sections, globalSections, offers, meta }: Props) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: Affected versions of next are vulnerable to Acceptance of Extraneous Untrusted Data With Trusted Data / Authorization Bypass Through User-Controlled Key.

Fix: Upgrade this library to at least version 13.5.7 at faststore/pnpm-lock.yaml:12940.

Reference(s): GHSA-gp8f-8m3g-qvj9, CVE-2024-46982

💬 To ignore this, reply with:
/fp <comment> for false positive
/ar <comment> for acceptable risk
/other <comment> for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by ssc-adb055b9-fed0-4d70-a57d-eb9825b09449.

@semgrep-code-vtex-org
Copy link

Semgrep found 3 ssc-adb055b9-fed0-4d70-a57d-eb9825b09449 findings:

Risk: Affected versions of next are vulnerable to Acceptance of Extraneous Untrusted Data With Trusted Data / Authorization Bypass Through User-Controlled Key.

Fix: Upgrade this library to at least version 13.5.7 at faststore/pnpm-lock.yaml:12940.

Reference(s): GHSA-gp8f-8m3g-qvj9, CVE-2024-46982

@Guilera Guilera force-pushed the feat/reviews-and-ratings branch from d57303d to 2203c7f Compare February 14, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on Depends on another PR - Please mention the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants